PDFLATEX=pdflatex

OTT = ott
OTT_FLAGS := -tex_wrap false -tex_show_meta false -picky_multiple_parses false

all : prog-generated.pdf

prog-ott.tex prog-generated.tex : prog.ott Makefile prog.tex
	$(OTT) $(OTT_FLAGS) -i prog.ott -o prog-ott.tex -tex_filter prog.tex prog-generated.tex

prog-generated.pdf : prog-generated.tex prog-ott.tex 
	$(PDFLATEX) prog-generated.tex
	$(PDFLATEX) prog-generated.tex

clean : 
	rm -f *.aux *.dvi *.ps *.log prog-ott.tex *.pdf

